home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_camlinecross.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  97 lines

  1. # Jones 3D Cog Script
  2. #
  3. # gen_CamLineB.cog
  4. #
  5. # Swings Camera around to indy's side during a short sayline
  6. #
  7. # [SXC]
  8. #
  9. # 11/23/98 SXC
  10. #
  11. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  12. #
  13. # ========================================================================================
  14.  
  15. symbols
  16.  
  17.     message     startup
  18.     message     activate
  19.  
  20.     thing       player                      local
  21.     thing       mirror
  22.  
  23.     thing       swingpos        
  24.     thing       mirrorpos       
  25.  
  26.     int         croscheck=0                 local
  27.     int         cursound                    local
  28.     
  29.     sound       indyline0=to05j03.wav       local
  30.     
  31.     sound       indylineb0=inxj058.wav      local
  32.     sound       indylineb1=inxj059.wav      local
  33.     sound       indylineb2=inxj060.wav      local
  34.     sound       indylineb3=inxj061.wav      local
  35.     sound       indylineb4=inxj090.wav      local
  36.     sound       indylineb5=inxj095.wav      local
  37.     
  38.     int         wepnum=1                    local
  39.     int         soundchan                   local
  40.              
  41. end
  42.  
  43. # ========================================================================================
  44.  
  45. code
  46.  
  47. startup:
  48.     player = GetLocalPlayerThing();
  49.     return;
  50.            
  51. # ========================================================================================
  52. activate:
  53.     If ((GetSenderRef() == mirror) && (croscheck == 0) && (GetCurItem(player) == 0))
  54.     {
  55.         croscheck = 1;
  56.         While(wepnum !=0)
  57.         {
  58.             wepnum = GetCurWeapon(player);
  59.             DeselectWeaponWait(player);
  60.             DeselectWeapon(player);
  61.         }
  62.         StartCutscene(1);
  63.         SetActorFlags(player, 0x200000);
  64.         DeselectWeapon(player);
  65.         DeselectWeaponWait(player);
  66.         StopThing(player);
  67.         PlayMode(player, 61, 0);
  68.         SetExtCamOffsetToThing(swingpos);
  69.         SetExtCamLookOffsetToThing(mirrorpos);
  70.         cursound = PlayVoice(player, indyline0, 1, 0);
  71.         sleep(0.35);
  72.         DestroyThing(mirror);
  73.         ChangeInv(player, 63, 1.0);
  74.         SetInvAvailable(player, 63, 1);
  75.         JonesInvItemChanged(63);
  76.         WaitForSound(cursound);
  77.         Sleep(1);
  78.         ClearActorFlags(player, 0x200000);
  79.         EndCutscene();
  80.         RestoreExtCam();
  81.         wepnum = 1;
  82.     }
  83.         
  84.     if ((GetCurItem(player) != 0) && (GetSenderRef() == mirror))
  85.     {
  86.         StopThing(player);
  87.         StartCutscene(0);
  88.         SetActorFlags(player, 0x200000);
  89.         PlayVoice(player, indylineb0[(RandBetween(0, 5))], 1, 1);
  90.         EndCutscene();
  91.         ClearActorFlags(player, 0x200000);
  92.     }
  93.     
  94. return;
  95.         
  96. end
  97.